import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';


@Component({
  selector: 'app-tests',
  templateUrl: './tests.component.html',
  styleUrls: ['./tests.component.css']
})


export class TestsComponent implements OnInit {
  
  constructor() {

  }

  ngOnInit() {

    function Person () {
      this.name = 'little bear',
      this.age = 18
      setInterval(() => {
        console.log('我叫' + this.name + '我今年' + this.age + '岁')
    },1000)
    }
    // let p = new Person()

  }
  

}

